<?php

/**
 * Общий конфиг (для рабочего и девелоперского сервера)
 */

return array(
    "encoding" => "UTF-8",
	"secret_word" => "2390uroemnlkev8n4309fusdfmv04u5tdfgu547vodmsfgkl4589dsvl",
	"img_hosts" => false,
    "enableJQuery" => true,
    "jQueryPath" => "/js/jquery.min.js",
    "jQueryNoConflictMode" => false,
    "jQueryUIPath" => '/js/jquery-ui-custom.min.js',
    "jQueryUIStylesheet" => '/css/custom-theme/jquery-ui.custom.css',
    "phpSettings" => array(
        "display_startup_errors" => 0,
        "display_errors" => 1,
    ),
    "autoloadernamespaces" => array('Workset', 'ZendX'),
    'pluginpaths' => array(
    	'Workset_Application_Resource' => 'Workset/Application/Resource',
    	//'Application_Action_Helper' => 'helpers',
    ),
    "enablePluginLoaderCache" => true,
    "bootstrap" => array(
        "path" => APPLICATION_PATH."/Bootstrap.php",
        "class" => "Bootstrap",
    ),
    "debug_mode" => false,
	"default_locale" => "ru",
    "resources" => array(
        "db" => array(
            'adapter' => 'Pdo_Mysql',
            'params' => array(
                'host' => "127.0.0.1",
                'dbname' => 'myzapp',
                'username' => 'myzappadmin',
                'password' => 'myzapp',
                'driver_options' => array(),
                'profiler' => false
            ),
            'isDefaultTableAdapter' => true
        ),
        'router' => array(
            "routes" => array(
            	'default' => array(
                    "route" => ":module/:controller/:action/*",
                    "defaults" => array(
                        'module' => 'default',
                        'controller' => 'index',
                        'action' => 'index',
                    ),
                ),
                'userprofile' => array(
                    "route" => "users/profile/:login/:action",
                    "defaults" => array(
                        'module' => 'users',
                        'controller' => 'profile',
                        'action' => 'index',
                		'login' => false,
                    ),
                ),
            ),
        ),
        "view" => array(),
        "frontController" => array(
            "moduledirectory" => MODULES_PATH,
            "modulecontrollerdirectoryname" => 'controllers',
        ),
        "layout" => array(
            "layout" => "default",
            "layoutPath" => APPLICATION_PATH."/layouts"
        ),
        "modules" => array(
            "users" => array(
                'init' => true,
                'options' => array(
                    'dependences' => array(),
                    'resource_loader' => true,
                    'resourceTypes' => null,
                    'bootstrap' => array(
						'controller'
					)
                )
            ),
            "catalogue" => array(
                'init' => false,
                'options' => array(
                    'dependences' => array('users'),
                    'resource_loader' => true,
                    'resourceTypes' => null,
                    'bootstrap' => array(
						'defaultStorage',
						'controller'
					)
                )
            ),
            "materials" => array(
                'init' => false,
                'options' => array(
                    //зависимости с другими модулями
                    'dependences' => array('users'),

                    //регистрировать в autoload ресурсы - модель, таблицы и т.д
                    'resource_loader' => true,

                    //указапие типов ресурсов для autoload
                    'resourceTypes' => null,

                    //загружать Bootstrap для модуля
                    'bootstrap' => array(
						'defaultStorage',
						'controller'
					)
                )
            )
        ),
        "translate" => array(
            'adapter' => 'Array',
            'registry_key' => 'Zend_Translate',
            'data' => array(),
            'options' => array(
                'disableNotices' => true
            )
        ),
        "cachemanager" => array(
            'default' => array(
                'frontend' => array(
                    'name' => 'Core',
                    'options' => array('automatic_serialization' => true)
                ),
                'backend' => array(
                    'name' => 'File',
                    'options' => array('cache_dir' => CACHE_PATH)
                )
            ),
            'metadata' => array(
                'frontend' => array(
                    'name' => 'Core',
                    'options' => array('automatic_serialization' => true)
                ),
                'backend' => array(
                    'name' => 'File',
                    'options' => array('cache_dir' => CACHE_PATH)
                )
            ),
        ),
        "access" => array(
        	'cachebuild' => 8,
        	'use_assert' => true,
        	'use_rating' => true,

			//ID пользователей, которые являются администраторами (суперпользователями)
        	'administrator_ids' => array(1),
        ),
        "auth" => array(
        	'table_user' => 't_user',
        ),
	),
	'email' => array(
		'from' => 'support@myzapp-cms.com',
	),
    
    'sphinx_search' => array(
        'host' => SEARCH_SERVER_IP,
	    'port' => SEARCH_SERVER_PORT,
	    'username' => '',
	    'password' => '',
        'profiler' => array(
        	'profiler' => 'Zend_Db_Profiler_Firebug',
       		'enabled' => false
    	),
    ),

    'sphinx_data_path' => null
);